﻿
function BindAutoComplete(url, selector, parameter) {
    if (!parameter) {
        parameter = {};
        parameter.pageIndex = 0;
        parameter.pageSize = 100;
    }
    $.post(url, parameter, function (result, textStatus) {
        $(selector).jquery_autocomplete(result, {
            minChars: 0,
            max: 100,
            matchContains: true,
            delay: 10,
            autoFill: false,
            mustMatch: false,
            selectFirst: false,
            width: 110
        });
    }, "json");
}

//$.ajax({
//    type: "post",
//    url: "/Contact/GetContactName",
//    data: { pageIndex: 0, pageSize: 20 },
//    complete: callSuccess,
//    dataType: "json"
//});